<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>无标题文档</title>
		   <script src="../js/jquery-3.5.1.slim.js"type="text/javascript"></script>
		   <script type="text/javascript">
		   	
		   	$(function(){
		   		
		   			$(".second").replaceWith($(".first"));
		   		$(".first").replaceAll($(".second"));
		   		

		   		
		   	})
		            //将苹果替换成菠萝
		          
		            //将菠萝替换成苹果
		           
		            //将苹果替换成菠萝
		</script>
		</head>
		
		<body>
		    <h3>例子</h3>
		    <div class="container">
		        <div class="first">苹果</div>
		        <div class="second">橘子</div>
		        <div class="third">菠萝</div>
		    </div>
		</body>
		</html>
